from knn import *
from testdigit import *

def classtest():
	traindata,trainlabel=loadTrainData()
	testdata=loadTestData()
	m,n=np.shape(testdata)
	resultlist=[]
	for i in range (m):
		result=classify(testdata[i],traindata[0:20000],trainlabel[0,0:20000],5)
		resultlist.append(result)
	saveresult(resultlist)

classtest()
